<!DOCTYPE html>
<html>
	<head lang="zh">
		<meta charset="UTF-8">
		<title>QxChat</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="renderer" content="ie-stand">
		<meta name="viewport" content="initial-scale = 1, user-scalable = no">
		<link rel="icon" href="qx.ico" type="image/ico">
		<link type="text/css" href="lib/css/bootstrap.css" rel="stylesheet"/>
		<link type="text/css" href="lib/css/zTreeStyle.css" rel="stylesheet"/>
		<link type="text/css" href="lib/css/index.css" rel="stylesheet"/>
        <link type="text/css" href="lib/css/layer.css" rel="stylesheet"/>
		<script src="lib/script/quote/jquery.js"></script>
        <script src="lib/script/quote/layer.js"></script>
		<script src="lib/script/quote/json2.js"></script>
		<script src="lib/script/quote/bootstrap.js"></script>
		<script src="lib/script/quote/jquery.base64.js"></script>
		<script src="lib/script/quote/jquery.ztree.all-3.5.js"></script>
	</head>
	<body style="overflow: hidden">
		<div id="qx-frameBody">
			<div id="qx-loginBody">
				<div class="qx-login-head" style="-webkit-app-region:drag">
					<div class="col-sm-12 qx-login-header" style="cursor:pointer;">
						<span class="title"> QxChat</span>
						<ul class="toolBtns">
							<li class="minisizeBtn" style="cursor:pointer;-webkit-app-region:no-drag;"></li>
							<li class="closeBtn" style="cursor:pointer;-webkit-app-region:no-drag;"></li>
						</ul>
					</div>
				</div>
				<div class="col-sm-12" id="qx-login-content" style="-webkit-app-region:no-drag;">
					<div class="col-sm-12">
						<img class="user-head" src="imgs/user-head.png" height="80" >
					</div>
					<div class="col-sm-12">
						<br/>
					</div>
					<div class="col-sm-12">
						<div class="col-sm-12">
							<input type="text" id="loginName"  class="form-control" placeholder="用户名" style="display: inline-block;width: 190px;margin-bottom: 5px" value="">
						</div>
						<div class="col-sm-12">
							<input type="text" id="password" class="form-control" placeholder="密码" style="display: inline-block;width: 190px;" value="">
						</div>
						<div class="checkbox">
							<label>
								<input type="checkbox" id="isRemember"> 记住密码
							</label>
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<label>
								<input type="checkbox" id="isAutoLogin"> 自动登录
							</label>
						</div>
					</div>
					<div class="col-sm-12">
						<div id="loginBtn" style="-webkit-app-region: no-drag;">
							<button class="btn btn-default"
							style="-webkit-app-region: no-drag;padding: 5px 66px;cursor: pointer;background-color: rgb(5,159,213)">
							登&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;录
							</button>
						</div>
					</div>
					<div class="col-sm-12">
						<br/>
					</div>
					<div class="col-sm-12">
						<a data-toggle="collapse" href="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
							<span class="glyphicon glyphicon-cog"></span> 设置
						</a>
					</div>
					<div class="col-sm-12">
						<br/>
					</div>
					<div class="col-sm-12 collapse" id="collapseExample">
						<div class="col-sm-12">
							<input type="text" class="form-control" id="g_ServerPath" placeholder="服务器地址" style="display: inline-block;width: 190px;margin-bottom: 5px" value="">
						</div>
						<div class="col-sm-12">
							<input type="text" class="form-control" id="g_ServerPort" placeholder="服务器端口" style="display: inline-block;width: 190px;" value="">
						</div>
						<div class="col-sm-12">
							<input type="text" class="form-control" id="g_ServerVideoPort" placeholder="视频服务端口" style="display: inline-block;width: 190px;" value="">
						</div>
					</div>
				</div>
			</div>
			<div id="qx-mainBody"  style="display :none;">
				<div class="qx-main-head">
					<div class="col-sm-12 qx-main-header" style="cursor:pointer;-webkit-app-region:drag;">
						<span class="title"> QxChat</span>
						<ul class="toolBtns">
							<li class="minisizeBtn" style="cursor:pointer;-webkit-app-region:no-drag;"></li>
							<li class="closeBtn" style="cursor:pointer;-webkit-app-region:no-drag;"></li>
						</ul>
					</div>
					<div class="col-sm-12" id="qx-main-user" style="cursor:pointer;-webkit-app-region:drag;">
						<img class="user-head" src="imgs/user-head.png" width="60" alt="userHead">
						<div class="user-descrip">
							<span id="userName_view">佚名</span>
							<div class="btn-group status" style="-webkit-app-region:no-drag;">
								<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
									<span class="sub-holder"></span>
									<span class="caret"></span>
								</a>
								<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
									<li style="-webkit-app-region:no-drag;">
										<a tabindex="-1" href="#"><span class="sub" style="background-position: 5px 10px"></span>我在线上</a>
									</li>
									<li style="-webkit-app-region:no-drag;">
										<a tabindex="-1" href="#"><span class="sub" style="background-position: 5px -134px"></span>隐身</a>
									</li>
									<li class="divider"></li>
									<li style="-webkit-app-region:no-drag;">
										<a tabindex="-1" href="#"><span class="sub" style="background-position: 5px -107px"></span>离开</a>
									</li>
									<!--<li style="-webkit-app-region:no-drag;">
											<a tabindex="-1" href="#"><span class="sub" style="background-position: 5px -159px"></span>注销登录</a>
									</li>-->
								</ul>
							</div>
							<div style="-webkit-app-region:no-drag;">
								<input id="qx-main-messageBoard" type="text" placeholder="请留言..." value="">
							</div>
							<div class="btn-group" id="qx-main-tool">
								<button type="button" class="btn btn-default" style="-webkit-app-region:no-drag; background-position: -2px -2px" ></button>
								<button type="button" class="btn btn-default" style="-webkit-app-region:no-drag; background-position: -20px -2px"></button>
								<button type="button" class="btn btn-default" style="-webkit-app-region:no-drag; background-position: -42px -2px"></button>
							</div>
						</div>
					</div>
					<div class="col-sm-12" style="-webkit-app-region: no-drag;">
						<input type="text" id="qx-main-search" placeholder="查找联系人、群组、分支...">
					</div>
					<div class="col-sm-12" id="content_tab" style="-webkit-app-region:no-drag;">
							<ul class="nav nav-tabs qx-xuan">
								<li class="active qx-xuan-li" title="最近联系人">
									<a href="#recent_contacts_pane" data-toggle="tab">
										<span></span><div></div>
									</a>
								</li>
								<li title="我的好友"><a href="#personal_contacts_pane" data-toggle="tab">
										<span></span><div></div>
									</a>
								</li>
								<li title="全部成员"><a href="#org_contacts_pane" data-toggle="tab">
										<span></span><div></div>
									</a>
								</li>
								<li title="群组"><a href="#group_contacts_pane" data-toggle="tab">
										<span></span><div></div>
									</a>
								</li>
							</ul>
					</div>
				</div>
				<div class="col-sm-12" id="qx-main-content" style="-webkit-app-region:no-drag;">
						<div class="tab-content">
							<div class="tab-pane active" id="recent_contacts_pane">
								<ul id="recentContactsDataView" class="ztree"></ul>
							</div>
							<div class="tab-pane" id="personal_contacts_pane">
								<ul id="personalBandDataView" class="ztree"></ul>
							</div>
							<div class="tab-pane" id="org_contacts_pane">
								<ul id="orgTreeView" class="ztree"></ul>
							</div>
							<div class="tab-pane" id="group_contacts_pane">
								<ul id="groupTreeView" class="ztree"></ul>
							</div>
						</div>
				</div>
				<div class="col-sm-12 btn-group" id="qx-main-footer">
					<button type="button" class="btn btn-default" onclick="haha()" style="-webkit-app-region:no-drag; background-position: 2px 5px" ></button>
					<button id="setBtn" type="button" class="btn btn-default" onclick="logout()" style="-webkit-app-region:no-drag; background-position: -27px 5px"></button>
					<button type="button" class="btn btn-default" onclick="debug()" style="-webkit-app-region:no-drag; background-position: -54px 5px"></button>
					<button type="button" class="btn btn-default" style="-webkit-app-region:no-drag; background-position: -82px 5px" ></button>
					<button type="button" class="btn btn-default" style="-webkit-app-region:no-drag; background-position: -111px 5px"></button>
					<button type="button" class="btn btn-default" style="-webkit-app-region:no-drag; background-position: -140px 5px"></button>
					<button type="button" class="btn btn-default" style="-webkit-app-region:no-drag; background-position: -170px 5px"></button>
				</div>
			</div>
		</div>
		<script>
			function haha(){
				var nwNotify = global.nwNotify;
				// Change config options
				nwNotify.setConfig({
				    appIcon: nwNotify.getAppPath() + 'logo.png',
				    displayTime: 60000000
				});

				// Send simple notification
				nwNotify.notify('Some titl木木木木木木木木木木木木木木木木木木木木木林木木木木e', 'Some 大厦大厦大厦大厦大厦大厦大厦大厦大厦大厦大厦大厦大厦大厦大厦大厦大厦大厦大厦大厦大厦大厦大厦大厦大厦text');
			}
			function logout(){
				$('#isAutoLogin').removeAttr("checked");
				localStorage.setItem("isAutoLogin",$('#isAutoLogin').is(':checked'));
				global.webSocketHandler.disconnect();
				window.location.reload();
			}
			function debug(){
        		var gui = require('nw.gui');
			    var win = gui.Window.get();
			    if (win.isDevToolsOpen()) {
			      win.closeDevTools();
			      this.innerText = "Open Developer Tools";
			    } else {
			      win.showDevTools();
			      this.innerText = "Close Developer Tools";
			    }
			}
		</script>
		<script src="lib/script/qxchat.js"></script>
		<script src="lib/script/tray.js"></script>
		<script src="lib/script/windowHandler.js"></script>
		<script src="lib/script/index.js"></script>
		<script src="lib/script/eventHandler.js"></script>
		<script src="lib/script/orgTree.js"></script>
		<script src="lib/script/recentContactsTree.js"></script>
		<script src="lib/script/personalBandTree.js"></script>
		<script src="lib/script/groupTree.js"></script>
		<script src="lib/script/ws.js"></script>
		<script src="lib/script/init.js"></script>
	</body>
</html>